
<%@ page language="java" %>

<%@ page import="com.scalar.chiptrack.commons.Constants,
                 com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<html:html locale="true">

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<HEAD><TITLE>Scalar Soft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js">
</SCRIPT>
<SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/functions.js">
</SCRIPT>
<script language="javascript">
function logOffAction()
{
     document.shippingAdviseForm.action="externalUserLogoff.do"
     document.shippingAdviseForm.submit();
     //window.close();
}
</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<%@include file="/jsp/includes/extHeader.jsp"  %>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0" bordercolor='#CCCCFF' align="center" valign="top" background="<%=chipTracContext%>/jsp/includes/images/cancelled_icon.gif">
        <TR>
            <TD width='20%' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
                <%@ include file="/jsp/admin/externaluser_menu.jsp" %>
            </TD>
            <TD width='1%' bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
            <TD width='1%' bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
            <TD valign="top" width="80%">
                <table border="0" cellspacing=0 cellpadding=0 width="90%">
                    <tr>
                        <%--<td width="10%" align="left"><IMG height=72 src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" width=180 border=0></td>--%>
                        <td width="70%" class="NArialW" align="center">Shipping Details</td>
                        <td width="20%">&nbsp;</td>
                        <%--<td width="20%" class="NArialL" align="right"><a href="javascript:logOffAction();">Log off</a></td>--%>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <html:form name="shippingAdviseForm" type="com.scalar.chiptrack.operations.packingslip.forms.ShippingAdviseForm" action="/shippingAdvise.do?action=updateinfo" scope="request">
                            <html:hidden name="shippingAdviseForm" property="customerShippingId"/>
                            <html:hidden name="shippingAdviseForm" property="customerName"/>
                            <html:hidden name="shippingAdviseForm" property="number"/>
                            <html:hidden name="shippingAdviseForm" property="status"/>
                            <html:hidden name="shippingAdviseForm" property="shippingFromLocationId"/>
                            <html:hidden name="shippingAdviseForm" property="dropShippment"/>

                            <input type="hidden" name="ps" value="<%=session.getAttribute("ps")%>">
                            <input type="hidden" name="cstKey" value="<%=session.getAttribute("cstKey")%>">

                            <input type=hidden name="trackingCount" value=0 >
                                <table border="0" width="100%" cellspacing="5" cellpadding="2" align=center valign=top class="NArialL">
                                <tr>
                                    <td colspan="5">
                                        <chiptrack:info   styleClass="NArialL"/><BR>
                                        <chiptrack:errors styleClass="NArialL"/><BR>
                                        <FONT id="JSErrMsg" styleClass="NArialL" color="red"></FONT><br>
                                        <FONT id="ErrMsg" styleClass="NArialL" color="red"></FONT>
                                    </td>
                                </tr>
                                <logic:notEmpty name="shippingAdviseForm" property="showSendShipAlertLink">
                                <tr>
                                    <td colspan="5" valign="top" align="center">
                                        <font class='NArialL'>
                                            [<a target="_blank" href="<%=chipTracContext%><bean:write name="shippingAdviseForm" property="generatedPackingSlipPdfURL"/>" onMouseOver="window.status='Printer-Friendly Version';return true" onMouseOut="window.status='';return true">
                                            Click here to donwload PDF Version of Packing Slip</a>]&nbsp;&nbsp;&nbsp;&nbsp;
                                            [<a target="_blank" href="<%=chipTracContext%><bean:write name="shippingAdviseForm" property="generatedCommercialInvoicePdfURL"/>" title='Click here to send the ship alert' onMouseOver="window.status='Click here to send the ship alert';return true" onMouseOut="window.status='';return true">
                                            Click here to donwload PDF Version of Commercial Invoice</a>]
                                        </font>
                                    </td>
                                </tr>
                                </logic:notEmpty>
                                <tr><td colspan="5">&nbsp;</td></tr>
                                <tr>
                                    <td width="20%" align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;<bean:message key="label.packingSlip.VendorFace.InvoiceNumber"/>:</td>
                                    <td width="25%" align="left">
                                        <bean:write name="shippingAdviseForm" property="number" />&nbsp;
                                    </td>
                                    <td width="2%">&nbsp;</td>
                                    <td width="15%" align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;PO Number:</td>
                                    <td width="38%" align="left">
                                        <bean:write name="shippingAdviseForm" property="poNumber" />&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;No. Of Boxes:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="cartonCount"/>&nbsp;
                                    </td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >
										&nbsp;&nbsp;
										<% if( ConfigManager.getShowPackageDimensionInPackingSlip() ) { %>
										Net Weight:
										<% } else { %>
										Weight:
										<% } %>
									</td>
                                    <td align="left" >
										<bean:write name="shippingAdviseForm" property="weight" />
										&nbsp;
										(<bean:write name="shippingAdviseForm" property="weightType"/>)										
									</td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Package Dimension:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="packageDimension"/>&nbsp;
                                    </td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Gross Weight:</td>
                                    <td align="left" ><bean:write name="shippingAdviseForm" property="grossWeight" />&nbsp;(<bean:message key="label.packingSlip.WeightMeasurements"/>)<%--(Lbs)--%></td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Forwarder:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="shippingMethod"/>
                                    </td>
                                    <td >&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;<bean:message key="label.sales.salesOrder.DeliveryTerms" /> :</td>
                                    <td align="left"><bean:write name="shippingAdviseForm" property="deliveryTerms"/></td>
                                </tr>
                                <tr> <%--to print status of Packing Slip--%>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Status:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="status"/>
                                    </td>
                                    <td >&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Number of Pallets:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="paletteCount" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;<bean:message key="label.sales.shippingInstructions" /></td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="shippingInstructions" />
                                    </td>
                                    <td >&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Comments:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="comments" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Actual Ship Date:&nbsp;(mm/dd/yyyy)</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm"  property="shipDate"/>
                                    </td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Freight Instructions:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="freightInstructions" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2">&nbsp;&nbsp;Packed By:</td>
                                    <td align="left"><bean:write name="shippingAdviseForm" property="packedby" /></td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Title:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="title" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2">&nbsp;&nbsp;MAWB No:</td>
                                    <td align="left"><bean:write name="shippingAdviseForm" property="mawb" /></td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;HAWB No:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="hawb" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2">&nbsp;&nbsp;Flight-1 No:</td>
                                    <td align="left"><bean:write name="shippingAdviseForm" property="flightNumberOne" /></td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;Flight-2 No:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="flightNumberTwo" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left" bgcolor="#DEE1E2">&nbsp;&nbsp;ETD:</td>
                                    <td align="left"><bean:write name="shippingAdviseForm" property="etd" /></td>
                                    <td>&nbsp;</td>
                                    <td align="left" bgcolor="#DEE1E2" >&nbsp;&nbsp;ETA:</td>
                                    <td align="left">
                                        <bean:write name="shippingAdviseForm" property="eta" />
                                    </td>
                                </tr>
                                <tr>
                                    <td bgcolor="#DEE1E2"><font class="NArialL">Freight Tracking No:</font></td>
                                    <td>
                                        <table class='NArialRS'>
                                            <logic:iterate name="shippingAdviseForm" property="tracking" id="track">
                                                <tr><td><bean:write name="track"/></td></tr>
                                            </logic:iterate>
                                        </table>
                                    </td>

                                </tr>
                                 <tr><td colspan=5><br></td></tr>
                                <%--START-PS-LINE ITEMS--%>
                                <logic:equal name="shippingAdviseForm" property="dropShippment" value="true">
                                <tr>
                                    <td colspan="5" width="100%" >
										<table border="0" width="98%" bordercolor="#FFFFFF">
											<tr>
												<td width="4%" align="center" bgcolor="#993333">
													<font class="NArialL"><font color="#FFFFFF">Line Item</font></font>
												</td>
                                                <% if (ConfigManager.getBooleanProperty(ConfigManager.SHOW_MFG_PARTNO_PACKINGSLIP ) ) { %>
												<td width="15%" align="center" bgcolor="#993333">
													<font class="NArialL"><font color="#FFFFFF"><bean:message key="label.mfgPartNumber"/></font></font>
												</td>
                                                <% }  %>
                                                <% if (ConfigManager.getBooleanProperty(ConfigManager.SHOW_MRKT_PARTNO_PACKINGSLIP ) ) { %>
                                                <td width="15%" align="center" bgcolor="#993333">
													<font class="NArialL"><font color="#FFFFFF"><bean:message key="label.mktgPartNumber"/></font></font>
												</td>
                                                <% } %>
												<td width="30%" align="center" bgcolor="#993333" nowrap>
													<font class="NArialL"><font color="#FFFFFF"><bean:message key="label.packingSlip.VendorFace.SubstitutePartNumber"/>&nbsp;&nbsp;</font></font>
												</td>
                                                <td width="25%" align="center" bgcolor="#993333" nowrap>
													<font class="NArialL"><font color="#FFFFFF">&nbsp;Substituted&nbsp;</font></font>
												</td>
                                                <td align="center" bgcolor="#993333">
                                                    <font class="NArialL"><font color="#FFFFFF"><bean:message key="label.customerPartNumber"/></font></font>
                                                </td>
                                                <td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Description</font></font></td>
                                                <td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Unit Type</font></font></td>
    											<td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Req. Dock Date</font></font></td>
												<td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Sch. Ship Date</font></font></td>
												<td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Requested Quantity</font></font></td>
												<td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quantity Shipped</font></font></td>
                                                <td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quantity Remaining</font></font></td>
												<td align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Status</font></font></td>
											</tr>
											<% int i = 0; %>
											<nested:iterate name="shippingAdviseForm" id="cslt" property="lineitems"  type="com.scalar.chiptrack.operations.packingslip.CustomerShippingLineItems" scope="request">
											<tr <%if( i++%2==0){%> bgcolor="#DEE1E2" <% } else {%> bgcolor="#FFFFFF" <%}%>>
												<td align="center">
													<font class="NArialL"><nested:write property="lineitemNumber"/></font>
													<nested:hidden property="customerShippingLineItemId"/>
													<nested:hidden property="lineitemNumber"/>
													<nested:hidden property="lineItemId"/>
												</td>
                                                <nested:hidden property="part_Number"/>
                                                <nested:hidden property="parentPartNumber"/>
                                                <% if (ConfigManager.getBooleanProperty(ConfigManager.SHOW_MFG_PARTNO_PACKINGSLIP ) ) { %>
												<td align="center" nowrap>
													<font class="NArialL"><nested:write property="part_Number"/></font>
												</td>
                                                <% }  %>
                                                <% if (ConfigManager.getBooleanProperty(ConfigManager.SHOW_MRKT_PARTNO_PACKINGSLIP ) ) { %>
                                                <td align="center" nowrap>
													<font class="NArialL"><nested:write property="mkt_Part_Number"/></font>
												</td>
                                                <% }  %>
                                                <td align="center" class="NArialL" nowrap valign="top">
                                                    <nested:write property="VSubstitutablePartNumbersAsTable" filter="false"/>
                                                </td>
                                                <td align="center" nowrap valign="top">
                                                    <nested:write property="VSubstitutablePartNumbersResultAsTable" filter="false"/>
                                                </td>
                                                <td align="center" nowrap>
                                                    <font class="NArialL"><nested:write property="customer_Part_Number"/></font>
                                                </td>
                                                <td align="center"><font class="NArialL"><nested:write property="cool_Description" />&nbsp;</font></td>
                                                <td align="center"  class="NArialL" nowrap><nested:write property="units"/></td>
												<td align="right" nowrap><font class="NArialL"><nested:write property="cool_Requested_Date"/></font></td>
												<td align="right" nowrap><font class="NArialL"><nested:write property="cool_Schedule_Date"/></font></td>
											    <td align="right" nowrap><font class="NArialL"><nested:write property="cool_Qty"/></font><nested:hidden property="cool_Qty"/></td>
												<td align=center >
													<font class="NArialL">
                                                        <nested:write property="qtyPulled" />
                                                        <nested:hidden property="hiddenQtyPulled" value='<%=cslt.getQtyPulled()+""%>'/>
                                                        <nested:hidden property="inventoryPulled" value='<%=cslt.getOrginalQtyPulled()+"" %>'/>
														<nested:hidden property="orginalQtyPulled"/>
													</font>
												</td>
                                                <td align="right"><font class="NArialL"><nested:write property="qtyToShip"/></font><nested:hidden property="qtyToShip"/></td>
												<td align="center"><font class="NArialL"><bean:write name="shippingAdviseForm" property="status"/></font></td>
											</tr>
											</nested:iterate>
											<input type= "hidden" name = "count" value="<%=i%>">
										</table>
                                    </td>
                                </tr>
                                </logic:equal>
                                <logic:notEqual name="shippingAdviseForm" property="dropShippment" value="true">
                                    <tr>
                                        <td colspan="5" width="100%" >
                                            <input type= "hidden" name = "count" value="0">&nbsp;
                                            <IMG height="1" src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width="1200">
                                        </td>
                                    </tr>
                                </logic:notEqual>
                                <%--END-PS-LINE ITEMS--%>
                                <tr><td colspan="5"><IMG height="1" src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width="1200"></td></tr>
                                <%--<tr><td colspan=5 align=center><br><br>[ <a href='javascript:window.close();' onMouseOver="window.status='Click here to close window';return true" onMouseOut="window.status='';return true">Close this window</a> ]</td></tr>--%>
                                </table>
                            </html:form>
                        </td>
                    </tr>
                </table>
                <BR><BR><BR>
            </TD>
        </TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
        <TR><TD bgColor='#493B76' colSpan=2><IMG height=2 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=800></TD></TR>
        <TR>
            <TD vAlign=top colSpan=2>
                <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
                        <TR align=right>
                            <TD noWrap background=<%=chipTracContext%>/jsp/includes/images/blue_gradient_bg2.gif>
                                <SPAN class=copyright>&nbsp;&nbsp;Copyright 2002
                                <A class=copyright target=_new href="http://www.scalarsoft.com" onMouseOver="window.status='www.scalarsoft.com';return true" onMouseOut="window.status='';return true">
                                Scalarsoft Inc.</A>
                                </SPAN><BR>
                                <SPAN class=footer_element>&nbsp;&nbsp;<A class=footer_element href="mailto:info@scalarsoft.com" onMouseOver="window.status='Contact us : info@scalarsoft.com';return true" onMouseOut="window.status='';return true">
                                Contact Us</A>
                                </SPAN>
                            </TD>
                            <TD align=right bgColor='#80C455'></TD>
                        </TR>
                    </TBODY>
                </TABLE>
            </TD>
        </TR>
        <TR><TD bgColor='#493B76' colSpan=2><IMG height=2 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=800></TD></TR>
    </TBODY>
</TABLE>
</body>
</html:html>
